package com.hyperf.core.web;

import org.springframework.web.servlet.HandlerInterceptor;

import java.util.Collections;
import java.util.List;

/**
 * @author lizhaoyang
 */
public abstract class AbstractInterceptor implements HandlerInterceptor {

    private static final String DEFAULT_PATH_PATTERNS = "/**";

    /**
     * 拦截器需要拦截的地址
     *
     * @return
     */
    public List<String> getPathPatterns() {
        return Collections.singletonList(DEFAULT_PATH_PATTERNS);
    }

    /**
     * 拦截器不需要拦截的地址
     *
     * @return
     */
    public List<String> getExcludePathPatterns() {
        return Collections.emptyList();
    }
}
